package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * 用户
 */
@Getter@Setter
@JsonIgnoreProperties("handler")
public class User extends BaseDomain{
    public static final Integer GENDER_WOMEN = 0;//女
    public static final Integer GENDER_MAN = 1;//男
    public static final Integer GENDER_SECRET = -1;//保密
    //用户对应的产品
    private List<Product> products = new ArrayList<>();

    //邮箱
    private String email;
    //昵称
    private String nickName;
    //密码
    private String password;
    //常用地
    private String place = "中国";
    //头像
    private String headImgUrl;
    //性别
    private Integer gender= GENDER_SECRET;
    //背景
    private String coverImgUrl;
    //签名
    private String sign;
    //粉丝
    private List<User> fans=new ArrayList<>();
    //关注
    private List<User> follow=new ArrayList<>();
    public String getGenderName(){
        String temp = "保密";
        if(gender==GENDER_MAN){
            temp = "男";
        }else if(gender==GENDER_WOMEN){
            temp = "女";
        }
        return temp;
    }
}